package Objetos 
{
	import flash.display.MovieClip;
	import flash.events.KeyboardEvent;
	import flash.ui.Keyboard;
	/**
	 * ...
	 * @author Vitor Picchi
	 */
	public class Heroi extends MovieClip
	{
		protected var NB_gravidade     :Number;
		protected var NB_velocidadeY   :Number;
		protected var NB_velocidadeX   :Number;
		
		protected var BO_dir           :Boolean;
		protected var BO_esq           :Boolean;
		public var BO_pulando          :Boolean;
		public var BO_morreu           :Boolean;
		public var BO_pegouUpgrade     :Boolean;
		
		
		protected var MC_tiro          :Tiro;
		
		protected var AR_tiros         :Array;
		
		public var UI_player           :uint;
		public var UI_vida             :uint;
		
		
		
		public function Heroi(player:uint) 
		{
			NB_velocidadeX = 0.9
			NB_velocidadeY = 0
			NB_gravidade = 5
			
			UI_player = player;
			
			Main.getStage().addEventListener(KeyboardEvent.KEY_DOWN, pressionar , false, 0, true)
			Main.getStage().addEventListener(KeyboardEvent.KEY_UP, soltar , false, 0, true)
			
			AR_tiros = new Array();
			
		}
		public function pressionar(e:KeyboardEvent):void
		{
			if (UI_player == 1)
			{
				switch(e.keyCode)
				{
					case Keyboard.D:
					BO_dir = true
					
						
				}
			}
		}
		
	}

}